package com.ext.portlet.chart.action;


import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.WindowState;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.liferay.portal.struts.PortletAction;

 
public class AddChartAction extends PortletAction {

	public ActionForward render(
			ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
			RenderRequest renderRequest, RenderResponse renderResponse)
		throws Exception {
		
		if (renderRequest.getWindowState().equals(WindowState.NORMAL)) {			
			return mapping.findForward("portlet.ext.chart.view");
		}
		else {			
			return mapping.findForward("portlet.ext.chart.view_chart");
		}
	}

}
